package top.shiyiri.shops.service;

import top.shiyiri.shops.bean.PageViewCountTop10;
import top.shiyiri.shops.dao.PageViewCountTop10Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Aunean
 * @date 2021/12/29
 */
@Service
public class PageViewCountTop10Service {

    @Autowired
    private PageViewCountTop10Dao dao;

    public List<PageViewCountTop10> pageViewCountTop10ByPage(int page, int i) {

        return dao.pageViewCountTop10ByPage((page - 1) * i, i);
    }

    public int totalLines() {
        return dao.totalLines();
    }

    public List<PageViewCountTop10> pageViewCountTop10() {
        return dao.pageViewCountTop10();
    }
}
